package com.zhx.threadcoreknowledge.synchromized;

/**
 * @author ：zhanghaixuan
 * @date ：Created in 2019-10-02 11:36
 * 用途         ： 可重入粒度测试2: 调用类内另外的方法
 */
public class SynchronizedOtherMethod11 {

    private synchronized void method1(){
        System.out.println("方法1");
        method2();
    }

    private synchronized void method2() {
        System.out.println("方法2");
    }

    public static void main(String[] args) {
        SynchronizedOtherMethod11 recursion10 = new SynchronizedOtherMethod11();
        recursion10.method1();
    }
}
